﻿Ext.regModel('User', {
    idProperty: 'USER_ID',
    fields: [
        { name: 'USER_ID', type: 'integer' },
        { name: 'NAME_FIRST', type: 'string' },
        { name: 'NAME_LAST', type: 'string' },
        { name: 'CARRIER_ID', type: 'integer' },
        { name: 'PHONE_NUMBER', type: 'string' },
        { name: 'USER_NAME', type: 'string' },
        { name: 'PASSWORD', type: 'string' },
        { name: 'DEFAULT_LAT', type: 'decimal' },
        { name: 'DEFAULT_LONG', type: 'decimal' },
        { name: 'CURRENT_LAT', type: 'decimal' },
        { name: 'CURRENT_LONG', type: 'decimal' },
        { name: 'EMAIL', type: 'integer' },
        { name: 'SMS', type: 'integer' },
        { name: 'USEREMAIL', type: 'string' },
    ]
});

userStore = new Ext.data.Store({
    model: 'User',
    proxy: {
        type: 'scripttag',
        //url: 'http://deals.expedia.com/beta/deals/hotels.jsonp',
        extraParams: {

    },
    reader: {
        type: 'json',
        root: 'users'
    },
    callbackParam: 'callback'
}
});

//userStore.load();
